import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css
import '@/assets/fonts/iconfont.css' // iconfont css
import '@/assets/fonts/iconfont.js' // iconfont js

import App from './App'
import store from './store'
import Router from "vue-router";
Vue.use(Router)

Vue.use(ElementUI, { locale })

Vue.config.productionTip = false

const createRouter = () => new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: [
    {
      path: '/helloWorld',
      component: () => import('@/views/HelloWorld/index'),
      hidden: true
    },

    // 404 page must be placed at the end !!!
    { path: '*', redirect: '/helloWorld', hidden: true }
  ]
})

new Vue({
  el: '#app',
  router: createRouter(),
  store,
  render: h => h(App)
})
